package com.stageadminserver.adminserver.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.stagecommon.common.pojo.Orders;
import com.stagecommon.common.pojo.RespBean;
import com.stagecommon.common.vo.OrdersVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.time.LocalDate;
import java.util.List;

public interface OrdersService extends IService<Orders> {

    /**
     * ��ѯ���ж���
     * @return
     */
    RespBean<List<OrdersVo>> selectAllOrders();

    /**
     * ���ݶ���id��ѯ������Ϣ
     * @param orderId
     * @return
     */
    RespBean selectOrderDetailById(Long orderId);

    /**
     * ��ҳ��ѯ����
     * @param currentPage
     * @param size
     * @param orders
     * @return
     */
    RespBean<IPage<OrdersVo>> selectAllOrderByPage(Integer currentPage, Integer size, Orders orders);

    /**
     * �������������ѯ������
     * @param day
     * @return
     */
    RespBean<Integer> getOrdersByDay(LocalDate day);

    /**
     * ���ݶ���id�޸Ķ�����Ϣ
     * @param orders
     * @return
     */
    RespBean<Integer> changeOrderById(Orders orders);

    /**
     * �ϴ��ļ�
     * @param file
     * @return
     * @throws IOException
     */
    RespBean adminUploadFile(MultipartFile file) throws IOException;

    /**
     * ��������
     * @param orders
     * @return
     */
    RespBean<Integer> adminAddOrder(Orders orders);

    /**
     * ���ݶ���idɾ������
     * @param orders
     * @return
     */
    RespBean<Integer> adminDeleteOrderById(Orders orders);
}
